package com.tz.farmer.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DetectionInfo implements Serializable {

    /**
     * CREATE TABLE `detection_info` (
     *   `id` int(11) NOT NULL COMMENT '自增id',
     *   `url` varchar(255) DEFAULT NULL COMMENT '检测图片OOS地址',
     *   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
     *   `p_info_id` int(11) DEFAULT NULL COMMENT '产品信息id',
     *   PRIMARY KEY (`id`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='检测信息';
     */

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "检测图片OOS地址")
    private String url;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "产品信息id")
    private Integer pInfoId;
}
